-<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>
<body>


    <script>
        // 定义数组的长度 [80,90,60,40,20] ，索引值： 0,1,2,3,4
        var  len = 5;
        for(var i = 0 ; i < len ;  i ++ ){
            console.log("--外循环第"+i+"次--")
            // 随着外部循环的次数的增加，不断减少内部循环的次数
            for(var j = 0 ; j < len -1 - i ; j ++){
                console.log("内循环第"+j+"次",j+1);
            }
        }
        
        for(var a = 0 ; a < len ; a ++){
            console.log("----外循环第" + a + "次----");
            for(var b = 0 ; b < len -1 -a ; b ++){
                console.log("内循环第" + b + "次");
            }
        }
    </script>
</body>
</html>